import numpy as np 
import matplotlib.pyplot as plt
from os import listdir
from sklearn.neural_network import MLPClassifier
from sklearn import datasets
from sklearn.model_selection import train_test_split as tts


digits = datasets.load_digits()
X_train,X_test,y_train,y_test = tts(digits.data,digits.target,test_size = 0.4)
clf = MLPClassifier(hidden_layer_sizes=(100),activation = 'relu',solver = 'adam', alpha = 0.001 ,learning_rate='constant')
clf.fit(X_train , y_train)
a = clf.score(X_test,y_test)
""" b = clf.predict(X_test)
for i in b:
    if b[i] == y_test[i]:
        print("true")
    else:
        print("false") """

print (a)


